package com.open.capacity.finance.dao;

import com.open.capacity.finance.entity.AuditModelWarn;
import com.open.capacity.finance.entity.AuditModelWarnUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 模型指标告警
 *
 * @author
 * @email
 * @date 2023-05-17 09:49:11
 */
@Mapper
public interface AuditModelWarnUserDao {

    int save(AuditModelWarnUser auditModelWarn);

    int update(AuditModelWarnUser auditModelWarn);

    int updateReadFlag(Long id);

    int updateIngoreFlag(@Param("id") Long id, @Param("ignoreEnddate") Date ignoreEnddate);

    int deleteByWarnId(Long warnId);

    List<AuditModelWarnUser> findByWarnId(Long warnId);

    AuditModelWarnUser findUserNeedWarnDate(@Param("modelId") String modelId, @Param("companyId") String companyId, @Param("userId") String userId);

    List<AuditModelWarnUser> findMy(Map<String, Object> params);

    List<AuditModelWarnUser> findAll(Map<String, Object> params);

    List<AuditModelWarnUser> findByCompanyId(@Param("companyId") String companyId);

}
